package com.xuliugen.jwt.demo.exception;

/**
 * 处理Http请求中RequestBody校验未通过的异常
 * @author xuliugen
 * @date 2018/1/8
 */
public class RequestBodyValidException extends RuntimeException {

    private static final long serialVersionUID = -1212272784792901500L;

    private String errorMsg;

    private Object object;

    public RequestBodyValidException(String errorMsg, Object object) {
        this.errorMsg = errorMsg;
        this.object = object;
    }

    public RequestBodyValidException(String message, String errorMsg, Object object) {
        super(message);
        this.errorMsg = errorMsg;
        this.object = object;
    }

    public RequestBodyValidException(String message, Throwable cause, String errorMsg, Object object) {
        super(message, cause);
        this.errorMsg = errorMsg;
        this.object = object;
    }

    public RequestBodyValidException(Throwable cause, String errorMsg, Object object) {
        super(cause);
        this.errorMsg = errorMsg;
        this.object = object;
    }

    public RequestBodyValidException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace, String errorMsg, Object object) {
        super(message, cause, enableSuppression, writableStackTrace);
        this.errorMsg = errorMsg;
        this.object = object;
    }

    public String getErrorMsg() {
        return errorMsg;
    }

    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }

    public Object getObject() {
        return object;
    }

    public void setObject(Object object) {
        this.object = object;
    }
}
